Conversation
Documents commands and architecture for agents like Claude Code. CLAUDE.md is symlinked to AGENTS.md so both conventions resolve to the same file. Adds "agentic" and "HMAC" to the VS Code spell-check list since both appear in the new doc. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Bump eslint, eslint-plugin-n (v18 ships ESM default export, so eslint.config.js now unwraps `.default`), globals, prettier, and release-it to latest. `npm audit fix` clears transitive lodash and picomatch advisories. - Move Prettier config from .prettierrc.json to prettier.config.js so the options can carry a JSDoc type hint for editor autocomplete. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`timingSafeEqual` throws `RangeError` when the buffers differ in length, so any signature that didn't base64-decode to 32 bytes was leaking out of the verifier instead of surfacing as the documented `TruepicWebhookVerifierError`. Pre-empt the length check so the public contract holds. Also drop the redundant base64 round-trip in favor of `digest()` returning raw bytes directly. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Reject headers with anything other than two non-empty comma-separated parts; the previous parser silently dropped anything past the second comma. - Split each `k=v` pair on the *first* `=` only. Base64 signatures end with `=` padding, so splitting on every `=` was silently truncating the trailing padding from the signature value. Worked in practice because Node's base64 decoder is lenient about padding, but the parser was dropping bytes from its input. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The happy path was previously bypassing the timestamp check with `leewayMinutes: 999999999` and the lone "not within allowed window" test relied on the fixture being years in the past, which only worked while real time kept marching forward. Replace with explicit boundary cases pinned to a fixed clock via `t.mock.timers`: - Happy path now uses the function's default leeway with the clock pinned to the moment the request was sent. - Four new cases cover exactly-at-boundary (passes) and one ms past the boundary (throws), in both the future and past directions. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
KenCorbettTruepic
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.